#pragma once

#include "Type.h"
#include "DecoratedType.h"

class CFunctionTypeGeneralized;
class CWidgetAttributeTypeGeneralized;
class CScriptDelegateGenerialized;

//generic type of TWidgetAttribute<T>
class WHENGINE_API CWidgetAttributeType : public CType
{
public:
    CWidgetAttributeType();

    static CWidgetAttributeType* GetStaticType();

    static CWidgetAttributeTypeGeneralized* FindAttributeType(CType* ValueType);

    static CString CreateTypeName(const CString& ElementType);
    static STypeID CreateID(const SDecoratedType & ElementType);

protected:
    static CString PlaceholderName;
};

//Generalized type of TWidgetAttribute<T>
class WHENGINE_API CWidgetAttributeTypeGeneralized: public CType
{
public:
    CWidgetAttributeTypeGeneralized(
        const SDecoratedType&  InElementType
        ,CFunctionTypeGeneralized * InGetterFunctionType
        ,CScriptDelegateGenerialized * InGetterDelegateType // delegate type of getter function
        );

    SDecoratedType GetElementType() const;
protected:
    CScriptDelegateGenerialized * GetterDelegateType;

};
